SpatialStream® Code Examples

Census Identify

Using Census Boundaries, GetByGeometry, and GetMap SpatialStream® components, you can display census boundaries in your mapping application and use server-side highlight techniques to provide identify functionality. This example will demonstrate how to display census boundaries and add highlight behavior with information return in a balloon. The Census Boundaries data component gives you access to nationwide census boundaries. The GetByGeometry component returns features at the mouse-click location, and GetMap displays the boundaries and the identified feature.

The advantage of the server-side highlight technique is that it gives you highly responsive interactivity with complex features and/or large data sets.

Census Boundaries | GetMap | GetByGeometry

var CensusBlkGroup = new Dmp.Layer.WMSLayer("census", "SS", {
antiAlias: true
});
CensusBlkGroup.addChild("CensusBlkGroup", "DMP_LICENSE/CensusBlockGroup_TA_DB", "$(ACCOUNT_FOLDER)SLD/CensusBlockGroup.sld.xml", {
attributeLinks: 'DEMOGRAPHICLINK', zoomRange: {
min: 10, max: 19
}
});
map.addLayer(CensusBlkGroup);

//----------------

var url = "getByGeometry.aspx" +
"?returnGeoType=1" +
"&dataSource=DMP_LICENSE/CensusBlockGroup_TA_DB" +
"&Geo=POINT(" + latLong.Longitude + " " + latLong.Latitude + ")" +
"&fields=CODE,_DMP_ID";
Dmp.Env.Connections["SS"].getJson(url, successCallback, errorCallback);


Run Sample   View Video   Back To Index